<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../js/layui/css/layui.css"/>
	</head>
	<body>
		<div class="layui-container">
			<div class="layui-row">
				<div class="layui-col-md6 layui-col-lg-offset3">
					<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
					  <legend>基本信息</legend>
					</fieldset>
					<div class="layui-form">
						<form action="" method="" class="layui-form layui-form-pane" lay-filter="Basic_info">
							<div class="layui-form-item">
							    <label class="layui-form-label">电话</label>
							    <div class="layui-input-block">
							      <input type="text" name="phone" id="phone" autocomplete="off"  class="layui-input" disabled="disabled">
							    </div>
							</div>
							
							<div class="layui-form-item">
							    <label class="layui-form-label">姓名</label>
							    <div class="layui-input-block">
							      <input type="text" name="D_name" id="D_name" autocomplete="off"  class="layui-input" disabled="disabled">
							    </div>
							</div>
							
							<div class="layui-form-item">
							    <label class="layui-form-label">身份证</label>
							    <div class="layui-input-block">
							      <input type="text" name="D_id" id="D_id" autocomplete="off"  class="layui-input" disabled="disabled">
							    </div>
							</div>
							
							<div class="layui-form-item">
							    <label class="layui-form-label">任职医院</label>
							    <div class="layui-input-block">
							      <input type="text" name="hospital" id="hospital" autocomplete="off" class="layui-input" disabled="disabled">
							    </div>
							</div>
							
							<div class="layui-form-item">
							    <label class="layui-form-label">资格证编号</label>
							    <div class="layui-input-block">
							      <input type="text" name="ZS_number" id="ZS_number" autocomplete="off"  class="layui-input" disabled="disabled">
							    </div>
							</div>
							
							 <!-- <div class="layui-form-item layui-form-text">
							    <label class="layui-form-label">自我介绍</label>
							    <div class="layui-input-block">
							      <textarea  name="introduce" id="introduce" class="layui-textarea" disabled="disabled"></textarea>
							    </div>
							 </div> -->
							
						</form>
					</div>
				</div>
			</div>		
		</div>
		
		<script src="../js/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			layui.use(['form', 'layer','layedit'], function(){
				var form = layui.form
				,layer = layui.layer
				,layedit = layui.layedit;
			  			
			var username = localStorage.getItem("FDSMS");
			window.onload = function(){
				// alert(username);
				$.ajax({
					url:'http://123.56.67.48:8080/getDocInfo',
					method:'POST',
					contentType:'application/json',
					data:JSON.stringify({
						phone:username//医生的电话
					}),
					success:function(res){
						console.log(res);
						var k = JSON.parse(res);
						$("#phone").val(username);
						$("#D_name").val(k.D_name);
						$("#D_id").val(k.D_id);
						$("#hospital").val(k.hosptial);
						$("#ZS_number").val(k.ZS_number);
						// $("#introduce").val("");
					},              
					error:function (res) {
							alert("失败"); 
					}					 	                          
				});		
			}
			});
		</script>
	</body>
</html>
